# -*- coding:utf-8 -*-
__author__ = 'gin.chen'
#%%
from elasticsearch import Elasticsearch

if __name__ == '__main__':
    es = Elasticsearch('10.2.29.102:9200')

    #create
    # es.index(index="azkaban-notice-offset", doc_type="offset_id", body={"exec_id": "4888"})
    #query
    result= es.search(index="azkaban-notice-offset", doc_type="offset_id")

    print(result.get('hits').get('_source').get('exec_id'))